using System;
using System.Collections.Generic;
using System.Reflection;
using System.Runtime.InteropServices;

using ILRuntime.CLR.TypeSystem;
using ILRuntime.CLR.Method;
using ILRuntime.Runtime.Enviorment;
using ILRuntime.Runtime.Intepreter;
using ILRuntime.Runtime.Stack;
using ILRuntime.Reflection;
using ILRuntime.CLR.Utils;
using System.Linq;

namespace ILRuntime.Runtime.Generated
{
    unsafe class huqiang_Framework_IMission_Binding
    {
        public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app)
        {
            BindingFlags flag = BindingFlags.Public | BindingFlags.Instance | BindingFlags.Static | BindingFlags.DeclaredOnly;
            MethodBase method;
            FieldInfo field;
            Type[] args;
            Type type = typeof(huqiang.Framework.IMission);
            args = new Type[]{};
            method = type.GetMethod("get_Running", flag, null, args, null);
            app.RegisterCLRMethodRedirection(method, get_Running_0);
            args = new Type[]{};
            method = type.GetMethod("get_Done", flag, null, args, null);
            app.RegisterCLRMethodRedirection(method, get_Done_1);
            args = new Type[]{};
            method = type.GetMethod("get_Progress", flag, null, args, null);
            app.RegisterCLRMethodRedirection(method, get_Progress_2);
            args = new Type[]{};
            method = type.GetMethod("Run", flag, null, args, null);
            app.RegisterCLRMethodRedirection(method, Run_3);
            args = new Type[]{};
            method = type.GetMethod("Reset", flag, null, args, null);
            app.RegisterCLRMethodRedirection(method, Reset_4);
            args = new Type[]{};
            method = type.GetMethod("Update", flag, null, args, null);
            app.RegisterCLRMethodRedirection(method, Update_5);

            field = type.GetField("State", flag);
            app.RegisterCLRFieldGetter(field, get_State_0);
            app.RegisterCLRFieldSetter(field, set_State_0);
            app.RegisterCLRFieldBinding(field, CopyToStack_State_0, AssignFromStack_State_0);
            field = type.GetField("Block", flag);
            app.RegisterCLRFieldGetter(field, get_Block_1);
            app.RegisterCLRFieldSetter(field, set_Block_1);
            app.RegisterCLRFieldBinding(field, CopyToStack_Block_1, AssignFromStack_Block_1);
            field = type.GetField("Name", flag);
            app.RegisterCLRFieldGetter(field, get_Name_2);
            app.RegisterCLRFieldSetter(field, set_Name_2);
            app.RegisterCLRFieldBinding(field, CopyToStack_Name_2, AssignFromStack_Name_2);
            field = type.GetField("Version", flag);
            app.RegisterCLRFieldGetter(field, get_Version_3);
            app.RegisterCLRFieldSetter(field, set_Version_3);
            app.RegisterCLRFieldBinding(field, CopyToStack_Version_3, AssignFromStack_Version_3);
            field = type.GetField("Tip", flag);
            app.RegisterCLRFieldGetter(field, get_Tip_4);
            app.RegisterCLRFieldSetter(field, set_Tip_4);
            app.RegisterCLRFieldBinding(field, CopyToStack_Tip_4, AssignFromStack_Tip_4);
            field = type.GetField("Completed", flag);
            app.RegisterCLRFieldGetter(field, get_Completed_5);
            app.RegisterCLRFieldSetter(field, set_Completed_5);
            app.RegisterCLRFieldBinding(field, CopyToStack_Completed_5, AssignFromStack_Completed_5);


            app.RegisterCLRCreateDefaultInstance(type, () => new huqiang.Framework.IMission());
            app.RegisterCLRCreateArrayInstance(type, s => new huqiang.Framework.IMission[s]);

            args = new Type[]{};
            method = type.GetConstructor(flag, null, args, null);
            app.RegisterCLRMethodRedirection(method, Ctor_0);

        }


        static StackObject* get_Running_0(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject* ptr_of_this_method;
            StackObject* __ret = ILIntepreter.Minus(__esp, 1);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
            huqiang.Framework.IMission instance_of_this_method = (huqiang.Framework.IMission)typeof(huqiang.Framework.IMission).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
            __intp.Free(ptr_of_this_method);

            var result_of_this_method = instance_of_this_method.Running;

            __ret->ObjectType = ObjectTypes.Integer;
            __ret->Value = result_of_this_method ? 1 : 0;
            return __ret + 1;
        }

        static StackObject* get_Done_1(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject* ptr_of_this_method;
            StackObject* __ret = ILIntepreter.Minus(__esp, 1);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
            huqiang.Framework.IMission instance_of_this_method = (huqiang.Framework.IMission)typeof(huqiang.Framework.IMission).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
            __intp.Free(ptr_of_this_method);

            var result_of_this_method = instance_of_this_method.Done;

            __ret->ObjectType = ObjectTypes.Integer;
            __ret->Value = result_of_this_method ? 1 : 0;
            return __ret + 1;
        }

        static StackObject* get_Progress_2(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject* ptr_of_this_method;
            StackObject* __ret = ILIntepreter.Minus(__esp, 1);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
            huqiang.Framework.IMission instance_of_this_method = (huqiang.Framework.IMission)typeof(huqiang.Framework.IMission).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
            __intp.Free(ptr_of_this_method);

            var result_of_this_method = instance_of_this_method.Progress;

            __ret->ObjectType = ObjectTypes.Float;
            *(float*)&__ret->Value = result_of_this_method;
            return __ret + 1;
        }

        static StackObject* Run_3(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject* ptr_of_this_method;
            StackObject* __ret = ILIntepreter.Minus(__esp, 1);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
            huqiang.Framework.IMission instance_of_this_method = (huqiang.Framework.IMission)typeof(huqiang.Framework.IMission).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
            __intp.Free(ptr_of_this_method);

            instance_of_this_method.Run();

            return __ret;
        }

        static StackObject* Reset_4(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject* ptr_of_this_method;
            StackObject* __ret = ILIntepreter.Minus(__esp, 1);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
            huqiang.Framework.IMission instance_of_this_method = (huqiang.Framework.IMission)typeof(huqiang.Framework.IMission).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
            __intp.Free(ptr_of_this_method);

            instance_of_this_method.Reset();

            return __ret;
        }

        static StackObject* Update_5(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject* ptr_of_this_method;
            StackObject* __ret = ILIntepreter.Minus(__esp, 1);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
            huqiang.Framework.IMission instance_of_this_method = (huqiang.Framework.IMission)typeof(huqiang.Framework.IMission).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
            __intp.Free(ptr_of_this_method);

            instance_of_this_method.Update();

            return __ret;
        }


        static object get_State_0(ref object o)
        {
            return ((huqiang.Framework.IMission)o).State;
        }

        static StackObject* CopyToStack_State_0(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = ((huqiang.Framework.IMission)o).State;
            __ret->ObjectType = ObjectTypes.Integer;
            __ret->Value = result_of_this_method;
            return __ret + 1;
        }

        static void set_State_0(ref object o, object v)
        {
            ((huqiang.Framework.IMission)o).State = (System.Int32)v;
        }

        static StackObject* AssignFromStack_State_0(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, IList<object> __mStack)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            System.Int32 @State = ptr_of_this_method->Value;
            ((huqiang.Framework.IMission)o).State = @State;
            return ptr_of_this_method;
        }

        static object get_Block_1(ref object o)
        {
            return ((huqiang.Framework.IMission)o).Block;
        }

        static StackObject* CopyToStack_Block_1(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = ((huqiang.Framework.IMission)o).Block;
            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
        }

        static void set_Block_1(ref object o, object v)
        {
            ((huqiang.Framework.IMission)o).Block = (System.String)v;
        }

        static StackObject* AssignFromStack_Block_1(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, IList<object> __mStack)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            System.String @Block = (System.String)typeof(System.String).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
            ((huqiang.Framework.IMission)o).Block = @Block;
            return ptr_of_this_method;
        }

        static object get_Name_2(ref object o)
        {
            return ((huqiang.Framework.IMission)o).Name;
        }

        static StackObject* CopyToStack_Name_2(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = ((huqiang.Framework.IMission)o).Name;
            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
        }

        static void set_Name_2(ref object o, object v)
        {
            ((huqiang.Framework.IMission)o).Name = (System.String)v;
        }

        static StackObject* AssignFromStack_Name_2(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, IList<object> __mStack)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            System.String @Name = (System.String)typeof(System.String).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
            ((huqiang.Framework.IMission)o).Name = @Name;
            return ptr_of_this_method;
        }

        static object get_Version_3(ref object o)
        {
            return ((huqiang.Framework.IMission)o).Version;
        }

        static StackObject* CopyToStack_Version_3(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = ((huqiang.Framework.IMission)o).Version;
            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
        }

        static void set_Version_3(ref object o, object v)
        {
            ((huqiang.Framework.IMission)o).Version = (System.String)v;
        }

        static StackObject* AssignFromStack_Version_3(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, IList<object> __mStack)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            System.String @Version = (System.String)typeof(System.String).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
            ((huqiang.Framework.IMission)o).Version = @Version;
            return ptr_of_this_method;
        }

        static object get_Tip_4(ref object o)
        {
            return ((huqiang.Framework.IMission)o).Tip;
        }

        static StackObject* CopyToStack_Tip_4(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = ((huqiang.Framework.IMission)o).Tip;
            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
        }

        static void set_Tip_4(ref object o, object v)
        {
            ((huqiang.Framework.IMission)o).Tip = (System.Action<huqiang.Framework.IMission>)v;
        }

        static StackObject* AssignFromStack_Tip_4(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, IList<object> __mStack)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            System.Action<huqiang.Framework.IMission> @Tip = (System.Action<huqiang.Framework.IMission>)typeof(System.Action<huqiang.Framework.IMission>).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)8);
            ((huqiang.Framework.IMission)o).Tip = @Tip;
            return ptr_of_this_method;
        }

        static object get_Completed_5(ref object o)
        {
            return ((huqiang.Framework.IMission)o).Completed;
        }

        static StackObject* CopyToStack_Completed_5(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = ((huqiang.Framework.IMission)o).Completed;
            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
        }

        static void set_Completed_5(ref object o, object v)
        {
            ((huqiang.Framework.IMission)o).Completed = (System.Action<huqiang.Framework.IMission>)v;
        }

        static StackObject* AssignFromStack_Completed_5(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, IList<object> __mStack)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            System.Action<huqiang.Framework.IMission> @Completed = (System.Action<huqiang.Framework.IMission>)typeof(System.Action<huqiang.Framework.IMission>).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)8);
            ((huqiang.Framework.IMission)o).Completed = @Completed;
            return ptr_of_this_method;
        }



        static StackObject* Ctor_0(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject* __ret = ILIntepreter.Minus(__esp, 0);

            var result_of_this_method = new huqiang.Framework.IMission();

            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
        }


    }
}
